﻿using Microsoft.VisualStudio.TestTools.UITest.Common;

namespace AXExtension.Filters
{
	/// <summary>
	/// There are a bunch of actions that pop up
	/// occasionally but don't have any impact on
	/// recording other than making actionfilters
	/// more complex and difficult to write. This
	/// removes those.
	/// </summary>
	class RemoveRedundancyFilter : Filter
	{
		public override void Run(IUITestActionStack stack)
		{
			if (stack.Peek().ActionName == "WheelRotate" ||
				stack.Peek().ActionName == "Left ButtonDown" ||
				stack.Peek().ActionName == "Left Drag")
			{
				stack.Pop();
			}
		}
	}
}
